If a copy of WebRunner is located on your computer, and you select a URL having the scheme "ascpt", then the data contained in the URL will be sent to your computer and run. Unlike CGI scripts run by the remote computer hosting the server, ascpt URLs are executed locally as the following link exemplifies. (You must have a copy of WebRunner on your computer before the script will work, and, until other Macintosh-based browsers mature, only the Netscape browser produces the desired effect.)
By the way, Alcuin was a Medieval librarian and advisor to Charlemagne.
tell application "Netscape 1.1N" display dialog "MacAlcuin says, 'Hello, World. I'm alive!'" buttons {"OK"} default button {"OK"} end tellAs you can see, this script simply tells the Netscape application to display a dialog box.
After you write your scripts making sure they run correctly and include plenty of error trapping, save the script as an ASCII text file. Next, drag the text file on to the WebRunner application. WebRunner will encode the script for you changing all the spaces, returns, colons, etc. to their proper escaped sequences. WebRunner will then copy your encoded script to the clipboard. From there, paste your script into a URL of an HTML document. This leads you to two big problems with WebRunner.
Consequently, your HTML files are even more difficult to debug, read, and maintain. For example, below is the URL that was used to create the "Resurrect Alcuin" script above:
<A HREF="ascpt:tell%20application%20%22 Netscape%201.1N%22%0D%09display%20dialog %20%22MacAlcuin%20says,%20%27Hello, %20World.%20I%27m%20alive!%27%22%20 buttons%20{%22OK%22}%20default%20 button%20{%22OK%22}%0Dend%20tell%0D"> Resurrect Alcuin</A>Yuck! Furthermore, these problematic URLs only get worse as the lengths of your scripts increase.
Eric last edited this page on September 26, 1995. Please feel free to send comments.